package com.liujun.microserver.auth2.client.server.api;

import java.util.ArrayList;
import java.util.List;

import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/api")
public class UserController {

	@RequestMapping("/userList")
	public ResponseEntity<List<UserInfo>> getUserinfo() {
		return ResponseEntity.ok(getList());
	}

	private List<UserInfo> getList() {
		List<UserInfo> list = new ArrayList<>();

		list.add(new UserInfo("kk", "kk@qq.com"));
		list.add(new UserInfo("liujun", "liujun@qq.com"));
		list.add(new UserInfo("feifei", "feifei@qq.com"));

		return list;
	}
}
